package App.Repository.impl;

import App.Model.Project.CrmProjectClient;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;
import java.util.Set;

public interface CrmProjectClientDao extends JpaRepository<CrmProjectClient,String> {
    @Query( value = " select recid,stageid,projectid,rectype,title,name,contact,phone,mail,persontype,titleid " +
            " from crm_project_client " +
            " where  projectid in (?1) ",nativeQuery = true)
    List<CrmProjectClient> getClientByProjectIds(Set<String> projectIds);

    @Query( value = " select recid,stageid,projectid,rectype,title,name,contact,phone,mail,persontype,titleid " +
            " from crm_project_client " +
            " where  projectid = ?1 ",nativeQuery = true)
    List<CrmProjectClient> getClientByProjectId(String projectId);
}
